import request from '@/sheep/request';

export default {
    //我的拜访
    getVisitRecordList: (params) =>
        request({
            url: 'api/visit_record/index',
            method: 'GET',
            params,
            custom: {
                showLoading: true,
                loadingMsg: '加载中',
                showError: true,
                showSuccess: false,
                errorMsg: '',
                auth: true,
                successMsg: false,
            },
        }),
    //拜访记录提交
    postVisitRecordAdd: (params) =>
        request({
            url: 'api/visit_record/add',
            method: 'POST',
            params,
            custom: {
                showLoading: true,
                loadingMsg: '加载中',
                showError: true,
                showSuccess: false,
                errorMsg: '',
                auth: true,
                successMsg: false,
            },
        }),
    // 拜访记录修改接口
    postVisitRecordEdit: (params) =>
        request({
            url: 'api/visit_record/edit',
            method: 'POST',
            params,
            custom: {
                showLoading: false,
                loadingMsg: '加载中',
                showError: true,
                showSuccess: true,
                errorMsg: '',
                auth: true,
                successMsg: false,
            },
        }),
    // 拜访记录删除接口
    postVisitRecordDelete: (params) =>
        request({
            url: 'api/visit_record/del',
            method: 'POST',
            params,
            custom: {
                showLoading: false,
                loadingMsg: '加载中',
                showError: true,
                showSuccess: true,
                errorMsg: '',
                auth: true,
                successMsg: false,
            },
        }),
    //   拜访详情
    getVisitRecordView: (params) =>
        request({
            url: 'api/visit_record/view',
            method: 'GET',
            params,
            custom: {
                showLoading: true,
                loadingMsg: '加载中',
                showError: true,
                showSuccess: false,
                errorMsg: '',
                auth: true,
                successMsg: false,
            },
        }),

    //记事本列表员工备忘录
    getMemorandumList: (params) =>
        request({
            url: 'api/memorandum/index',
            method: 'GET',
            params,
            custom: {
                showLoading: true,
                loadingMsg: '加载中',
                showError: true,
                showSuccess: false,
                errorMsg: '',
                auth: true,
                successMsg: false,
            },
        }),
    //员工备忘录添加
    postMemorandumAdd: (params) =>
        request({
            url: 'api/memorandum/add',
            method: 'POST',
            params,
            custom: {
                showLoading: false,
                loadingMsg: '加载中',
                showError: true,
                showSuccess: true,
                errorMsg: '',
                auth: true,
                successMsg: false,
            },
        }),
    //备忘录修改
    postMemorandumEdit: (params) =>
        request({
            url: 'api/memorandum/edit',
            method: 'POST',
            params,
            custom: {
                showLoading: false,
                loadingMsg: '加载中',
                showError: true,
                showSuccess: true,
                errorMsg: '',
                auth: true,
                successMsg: false,
            },
        }),
    //备忘录del
    postMemorandumDel: (params) =>
        request({
            url: 'api/memorandum/del',
            method: 'GET',
            params,
            custom: {
                showLoading: false,
                loadingMsg: '加载中',
                showError: true,
                showSuccess: true,
                errorMsg: '',
                auth: true,
                successMsg: false,
            },
        }),
};
